t = input("What is the temperature?")

if t[-1] in ["F"]:
    T = int((eval(t[0:-1]) - 32)/1.8)
    print(f"The converted temperature is {str(T)}C")
elif t[-1] in ["C"]:
    T = int(eval(t[0:-1]) * 1.8 + 32)
    print(f"The converted temperature is {str(T)}F")
